﻿using System.Windows;
using System.Windows.Media;

namespace FireUI.Themes.WPF.Assists
{
    public class FrameElementAssist
    {
        #region AttachedProperty:CornerRadius

        public static readonly DependencyProperty CornerRadiusProperty =
            DependencyProperty.RegisterAttached(
                "CornerRadius",
                typeof(CornerRadius),
                typeof(FrameElementAssist),
                new FrameworkPropertyMetadata(
                    default(CornerRadius),
                    FrameworkPropertyMetadataOptions.Inherits
                )
            );

        public static CornerRadius GetCornerRadius(DependencyObject element) =>
            (CornerRadius)element.GetValue(CornerRadiusProperty);

        public static void SetCornerRadius(DependencyObject element, CornerRadius value) =>
            element.SetValue(CornerRadiusProperty, value);

        #endregion AttachedProperty:CornerRadius

        #region AttachedProperty:Fill

        public static readonly DependencyProperty FillProperty =
            DependencyProperty.RegisterAttached(
                "Fill",
                typeof(Brush),
                typeof(FrameElementAssist),
                new FrameworkPropertyMetadata(
                    default(Brush),
                    FrameworkPropertyMetadataOptions.Inherits
                )
            );

        public static Brush? GetFill(DependencyObject element) =>
            (Brush)element.GetValue(FillProperty);

        public static void SetFill(DependencyObject element, Brush value) =>
            element.SetValue(FillProperty, value);

        #endregion AttachedProperty:Fill

        #region AttachedProperty:Stroke

        public static readonly DependencyProperty StrokeProperty =
            DependencyProperty.RegisterAttached(
                "Stroke",
                typeof(Brush),
                typeof(FrameElementAssist),
                new FrameworkPropertyMetadata(
                    default(Brush),
                    FrameworkPropertyMetadataOptions.Inherits
                )
            );

        public static Brush? GetStroke(DependencyObject element) =>
            (Brush)element.GetValue(StrokeProperty);

        public static void SetStroke(DependencyObject element, Brush value) =>
            element.SetValue(StrokeProperty, value);

        #endregion AttachedProperty:Stroke

        #region AttachedProperty:RippleFeedBack

        public static Brush GetRippleFeedBack(DependencyObject element) =>
            (Brush)element.GetValue(RippleFeedBackProperty);

        public static void SetRippleFeedBack(DependencyObject element, Brush value) =>
            element.SetValue(RippleFeedBackProperty, value);

        public static readonly DependencyProperty RippleFeedBackProperty =
            DependencyProperty.RegisterAttached(
                "RippleFeedBack",
                typeof(Brush),
                typeof(FrameElementAssist),
                new FrameworkPropertyMetadata(
                    default(Brush),
                    FrameworkPropertyMetadataOptions.Inherits
                )
            );

        #endregion AttachedProperty:RippleFeedBack

        #region AttachedProperty:MouseOverBrush

        public static Brush GetMouseOverBrush(DependencyObject element) =>
            (Brush)element.GetValue(MouseOverBrushProperty);

        public static void SetMouseOverBrush(DependencyObject element, Brush value) =>
            element.SetValue(MouseOverBrushProperty, value);

        public static readonly DependencyProperty MouseOverBrushProperty =
            DependencyProperty.RegisterAttached(
                "MouseOverBrush",
                typeof(Brush),
                typeof(FrameElementAssist),
                new FrameworkPropertyMetadata(
                    default(Brush),
                    FrameworkPropertyMetadataOptions.Inherits
                )
            );

        #endregion AttachedProperty:MouseOverBrush

        #region AttachedProperty:MouseDownBrush

        public static Brush GetMouseDownBrush(DependencyObject element) =>
            (Brush)element.GetValue(MouseDownBrushProperty);

        public static void SetMouseDownBrush(DependencyObject element, Brush value) =>
            element.SetValue(MouseDownBrushProperty, value);

        public static readonly DependencyProperty MouseDownBrushProperty =
            DependencyProperty.RegisterAttached(
                "MouseDownBrush",
                typeof(Brush),
                typeof(FrameElementAssist),
                new FrameworkPropertyMetadata(
                    default(Brush),
                    FrameworkPropertyMetadataOptions.Inherits
                )
            );

        #endregion AttachedProperty:MouseOverBrush

    }
}
